Trait frame_support::dispatch::Clone 1.0.0[−][src]
pub trait Clone {
fn clone(&self) -> Self;
fn clone_from(&mut self, source: &Self) { ... }
}Expand description
A common trait for the ability to explicitly duplicate an object.
Differs from Copy in that Copy is implicit and an inexpensive bit-wise copy, while
Clone is always explicit and may or may not be expensive. In order to enforce
these characteristics, Rust does not allow you to reimplement Copy, but you
may reimplement Clone and run arbitrary code.
Since Clone is more general than Copy, you can automatically make anything
Copy be Clone as well.
Derivable
This trait can be used with #[derive] if all fields are Clone. The derived
implementation of Clone calls clone on each field.
For a generic struct, #[derive] implements Clone conditionally by adding bound Clone on
generic parameters.
// `derive` implements Clone for Reading<T> when T is Clone.
#[derive(Clone)]
struct Reading<T> {
frequency: T,
}How can I implement Clone?
Types that are Copy should have a trivial implementation of Clone. More formally:
if T: Copy, x: T, and y: &T, then let x = y.clone(); is equivalent to let x = *y;.
Manual implementations should be careful to uphold this invariant; however, unsafe code
must not rely on it to ensure memory safety.
An example is a generic struct holding a function pointer. In this case, the
implementation of Clone cannot be derived, but can be implemented as:
struct Generate<T>(fn() -> T);
impl<T> Copy for Generate<T> {}
impl<T> Clone for Generate<T> {
fn clone(&self) -> Self {
*self
}
}Additional implementors
In addition to the implementors listed below,
the following types also implement Clone:
- Function item types (i.e., the distinct types defined for each function)
- Function pointer types (e.g.,
fn() -> i32) - Array types, for all sizes, if the item type also implements
Clone(e.g.,[i32; 123456]) - Tuple types, if each component also implements
Clone(e.g.,(),(i32, bool)) - Closure types, if they capture no value from the environment
or if all such captured values implement
Clonethemselves. Note that variables captured by shared reference always implementClone(even if the referent doesn’t), while variables captured by mutable reference never implementClone.
Required methods
Provided methods
fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source.
a.clone_from(&b) is equivalent to a = b.clone() in functionality,
but can be overridden to reuse the resources of a to avoid unnecessary
allocations.
Implementations on Foreign Types
pub fn clone(&self) -> Box<CStr, Global>ⓘimpl<R> Read for Box<R, Global> where
R: Read + ?Sized, impl<W> Write for Box<W, Global> where
W: Write + ?Sized, impl<F, A> Future for Box<F, A> where
F: Future + Unpin + ?Sized,
A: Allocator + 'static, type Output = <F as Future>::Output;impl<I, A> Iterator for Box<I, A> where
I: Iterator + ?Sized,
A: Allocator, type Item = <I as Iterator>::Item;
impl<R> Read for Box<R, Global> where
R: Read + ?Sized, impl<W> Write for Box<W, Global> where
W: Write + ?Sized, impl<F, A> Future for Box<F, A> where
F: Future + Unpin + ?Sized,
A: Allocator + 'static, type Output = <F as Future>::Output;impl<I, A> Iterator for Box<I, A> where
I: Iterator + ?Sized,
A: Allocator, type Item = <I as Iterator>::Item;pub fn clone(&self) -> Box<OsStr, Global>ⓘimpl<R> Read for Box<R, Global> where
R: Read + ?Sized, impl<W> Write for Box<W, Global> where
W: Write + ?Sized, impl<F, A> Future for Box<F, A> where
F: Future + Unpin + ?Sized,
A: Allocator + 'static, type Output = <F as Future>::Output;impl<I, A> Iterator for Box<I, A> where
I: Iterator + ?Sized,
A: Allocator, type Item = <I as Iterator>::Item;
impl<R> Read for Box<R, Global> where
R: Read + ?Sized, impl<W> Write for Box<W, Global> where
W: Write + ?Sized, impl<F, A> Future for Box<F, A> where
F: Future + Unpin + ?Sized,
A: Allocator + 'static, type Output = <F as Future>::Output;impl<I, A> Iterator for Box<I, A> where
I: Iterator + ?Sized,
A: Allocator, type Item = <I as Iterator>::Item;pub fn clone(&self) -> Box<Path, Global>ⓘimpl<R> Read for Box<R, Global> where
R: Read + ?Sized, impl<W> Write for Box<W, Global> where
W: Write + ?Sized, impl<F, A> Future for Box<F, A> where
F: Future + Unpin + ?Sized,
A: Allocator + 'static, type Output = <F as Future>::Output;impl<I, A> Iterator for Box<I, A> where
I: Iterator + ?Sized,
A: Allocator, type Item = <I as Iterator>::Item;
impl<R> Read for Box<R, Global> where
R: Read + ?Sized, impl<W> Write for Box<W, Global> where
W: Write + ?Sized, impl<F, A> Future for Box<F, A> where
F: Future + Unpin + ?Sized,
A: Allocator + 'static, type Output = <F as Future>::Output;impl<I, A> Iterator for Box<I, A> where
I: Iterator + ?Sized,
A: Allocator, type Item = <I as Iterator>::Item;Clone a sender to send to other threads.
Note, be aware of the lifetime of the sender because all senders
(including the original) need to be dropped in order for
Receiver::recv to stop blocking.
Shared references can be cloned, but mutable references cannot!
Shared references can be cloned, but mutable references cannot!
impl<I, U, F> Clone for FlatMap<I, U, F> where
I: Clone,
F: Clone,
U: Clone + IntoIterator,
<U as IntoIterator>::IntoIter: Clone,
impl<I, U, F> Clone for FlatMap<I, U, F> where
I: Clone,
F: Clone,
U: Clone + IntoIterator,
<U as IntoIterator>::IntoIter: Clone,
pub fn clone(&self) -> Box<str, Global>ⓘimpl<R> Read for Box<R, Global> where
R: Read + ?Sized, impl<W> Write for Box<W, Global> where
W: Write + ?Sized, impl<F, A> Future for Box<F, A> where
F: Future + Unpin + ?Sized,
A: Allocator + 'static, type Output = <F as Future>::Output;impl<I, A> Iterator for Box<I, A> where
I: Iterator + ?Sized,
A: Allocator, type Item = <I as Iterator>::Item;
impl<R> Read for Box<R, Global> where
R: Read + ?Sized, impl<W> Write for Box<W, Global> where
W: Write + ?Sized, impl<F, A> Future for Box<F, A> where
F: Future + Unpin + ?Sized,
A: Allocator + 'static, type Output = <F as Future>::Output;impl<I, A> Iterator for Box<I, A> where
I: Iterator + ?Sized,
A: Allocator, type Item = <I as Iterator>::Item;pub fn clone(&self) -> Box<[T], A>ⓘimpl<R> Read for Box<R, Global> where
R: Read + ?Sized, impl<W> Write for Box<W, Global> where
W: Write + ?Sized, impl<F, A> Future for Box<F, A> where
F: Future + Unpin + ?Sized,
A: Allocator + 'static, type Output = <F as Future>::Output;impl<I, A> Iterator for Box<I, A> where
I: Iterator + ?Sized,
A: Allocator, type Item = <I as Iterator>::Item;
impl<R> Read for Box<R, Global> where
R: Read + ?Sized, impl<W> Write for Box<W, Global> where
W: Write + ?Sized, impl<F, A> Future for Box<F, A> where
F: Future + Unpin + ?Sized,
A: Allocator + 'static, type Output = <F as Future>::Output;impl<I, A> Iterator for Box<I, A> where
I: Iterator + ?Sized,
A: Allocator, type Item = <I as Iterator>::Item;pub fn clone(&self) -> Box<T, A>ⓘimpl<R> Read for Box<R, Global> where
R: Read + ?Sized, impl<W> Write for Box<W, Global> where
W: Write + ?Sized, impl<F, A> Future for Box<F, A> where
F: Future + Unpin + ?Sized,
A: Allocator + 'static, type Output = <F as Future>::Output;impl<I, A> Iterator for Box<I, A> where
I: Iterator + ?Sized,
A: Allocator, type Item = <I as Iterator>::Item;
pub fn clone(&self) -> Box<T, A>ⓘimpl<R> Read for Box<R, Global> where
R: Read + ?Sized, impl<W> Write for Box<W, Global> where
W: Write + ?Sized, impl<F, A> Future for Box<F, A> where
F: Future + Unpin + ?Sized,
A: Allocator + 'static, type Output = <F as Future>::Output;impl<I, A> Iterator for Box<I, A> where
I: Iterator + ?Sized,
A: Allocator, type Item = <I as Iterator>::Item;
impl<R> Read for Box<R, Global> where
R: Read + ?Sized, impl<W> Write for Box<W, Global> where
W: Write + ?Sized, impl<F, A> Future for Box<F, A> where
F: Future + Unpin + ?Sized,
A: Allocator + 'static, type Output = <F as Future>::Output;impl<I, A> Iterator for Box<I, A> where
I: Iterator + ?Sized,
A: Allocator, type Item = <I as Iterator>::Item;Returns a new box with a clone() of this box’s contents.
Examples
let x = Box::new(5);
let y = x.clone();
// The value is the same
assert_eq!(x, y);
// But they are unique objects
assert_ne!(&*x as *const i32, &*y as *const i32);Copies source’s contents into self without creating a new allocation.
Examples
let x = Box::new(5);
let mut y = Box::new(10);
let yp: *const i32 = &*y;
y.clone_from(&x);
// The value is the same
assert_eq!(x, y);
// And no allocation occurred
assert_eq!(yp, &*y);Cloning an ANSIGenericString will clone its underlying string.
Examples
use ansi_term::ANSIString;
let plain_string = ANSIString::from("a plain string");
let clone_string = plain_string.clone();
assert_eq!(clone_string, plain_string);pub fn clone(&self) -> Box<RawValue, Global>ⓘimpl<R> Read for Box<R, Global> where
R: Read + ?Sized, impl<W> Write for Box<W, Global> where
W: Write + ?Sized, impl<F, A> Future for Box<F, A> where
F: Future + Unpin + ?Sized,
A: Allocator + 'static, type Output = <F as Future>::Output;impl<I, A> Iterator for Box<I, A> where
I: Iterator + ?Sized,
A: Allocator, type Item = <I as Iterator>::Item;
impl<R> Read for Box<R, Global> where
R: Read + ?Sized, impl<W> Write for Box<W, Global> where
W: Write + ?Sized, impl<F, A> Future for Box<F, A> where
F: Future + Unpin + ?Sized,
A: Allocator + 'static, type Output = <F as Future>::Output;impl<I, A> Iterator for Box<I, A> where
I: Iterator + ?Sized,
A: Allocator, type Item = <I as Iterator>::Item;pub fn clone(&self) -> Box<dyn SpawnEssentialNamed + Send + 'clone, Global>ⓘimpl<R> Read for Box<R, Global> where
R: Read + ?Sized, impl<W> Write for Box<W, Global> where
W: Write + ?Sized, impl<F, A> Future for Box<F, A> where
F: Future + Unpin + ?Sized,
A: Allocator + 'static, type Output = <F as Future>::Output;impl<I, A> Iterator for Box<I, A> where
I: Iterator + ?Sized,
A: Allocator, type Item = <I as Iterator>::Item;
impl<R> Read for Box<R, Global> where
R: Read + ?Sized, impl<W> Write for Box<W, Global> where
W: Write + ?Sized, impl<F, A> Future for Box<F, A> where
F: Future + Unpin + ?Sized,
A: Allocator + 'static, type Output = <F as Future>::Output;impl<I, A> Iterator for Box<I, A> where
I: Iterator + ?Sized,
A: Allocator, type Item = <I as Iterator>::Item;pub fn clone(&self) -> Box<dyn SpawnNamed + Sync + 'clone, Global>ⓘimpl<R> Read for Box<R, Global> where
R: Read + ?Sized, impl<W> Write for Box<W, Global> where
W: Write + ?Sized, impl<F, A> Future for Box<F, A> where
F: Future + Unpin + ?Sized,
A: Allocator + 'static, type Output = <F as Future>::Output;impl<I, A> Iterator for Box<I, A> where
I: Iterator + ?Sized,
A: Allocator, type Item = <I as Iterator>::Item;
impl<R> Read for Box<R, Global> where
R: Read + ?Sized, impl<W> Write for Box<W, Global> where
W: Write + ?Sized, impl<F, A> Future for Box<F, A> where
F: Future + Unpin + ?Sized,
A: Allocator + 'static, type Output = <F as Future>::Output;impl<I, A> Iterator for Box<I, A> where
I: Iterator + ?Sized,
A: Allocator, type Item = <I as Iterator>::Item;pub fn clone(&self) -> Box<dyn SpawnNamed + Send + Sync + 'clone, Global>ⓘimpl<R> Read for Box<R, Global> where
R: Read + ?Sized, impl<W> Write for Box<W, Global> where
W: Write + ?Sized, impl<F, A> Future for Box<F, A> where
F: Future + Unpin + ?Sized,
A: Allocator + 'static, type Output = <F as Future>::Output;impl<I, A> Iterator for Box<I, A> where
I: Iterator + ?Sized,
A: Allocator, type Item = <I as Iterator>::Item;
impl<R> Read for Box<R, Global> where
R: Read + ?Sized, impl<W> Write for Box<W, Global> where
W: Write + ?Sized, impl<F, A> Future for Box<F, A> where
F: Future + Unpin + ?Sized,
A: Allocator + 'static, type Output = <F as Future>::Output;impl<I, A> Iterator for Box<I, A> where
I: Iterator + ?Sized,
A: Allocator, type Item = <I as Iterator>::Item;pub fn clone(&self) -> Box<dyn SpawnNamed + 'clone, Global>ⓘimpl<R> Read for Box<R, Global> where
R: Read + ?Sized, impl<W> Write for Box<W, Global> where
W: Write + ?Sized, impl<F, A> Future for Box<F, A> where
F: Future + Unpin + ?Sized,
A: Allocator + 'static, type Output = <F as Future>::Output;impl<I, A> Iterator for Box<I, A> where
I: Iterator + ?Sized,
A: Allocator, type Item = <I as Iterator>::Item;
impl<R> Read for Box<R, Global> where
R: Read + ?Sized, impl<W> Write for Box<W, Global> where
W: Write + ?Sized, impl<F, A> Future for Box<F, A> where
F: Future + Unpin + ?Sized,
A: Allocator + 'static, type Output = <F as Future>::Output;impl<I, A> Iterator for Box<I, A> where
I: Iterator + ?Sized,
A: Allocator, type Item = <I as Iterator>::Item;pub fn clone(&self) -> Box<dyn SpawnEssentialNamed + Sync + 'clone, Global>ⓘimpl<R> Read for Box<R, Global> where
R: Read + ?Sized, impl<W> Write for Box<W, Global> where
W: Write + ?Sized, impl<F, A> Future for Box<F, A> where
F: Future + Unpin + ?Sized,
A: Allocator + 'static, type Output = <F as Future>::Output;impl<I, A> Iterator for Box<I, A> where
I: Iterator + ?Sized,
A: Allocator, type Item = <I as Iterator>::Item;
impl<R> Read for Box<R, Global> where
R: Read + ?Sized, impl<W> Write for Box<W, Global> where
W: Write + ?Sized, impl<F, A> Future for Box<F, A> where
F: Future + Unpin + ?Sized,
A: Allocator + 'static, type Output = <F as Future>::Output;impl<I, A> Iterator for Box<I, A> where
I: Iterator + ?Sized,
A: Allocator, type Item = <I as Iterator>::Item;pub fn clone(&self) -> Box<dyn SpawnEssentialNamed + 'clone, Global>ⓘimpl<R> Read for Box<R, Global> where
R: Read + ?Sized, impl<W> Write for Box<W, Global> where
W: Write + ?Sized, impl<F, A> Future for Box<F, A> where
F: Future + Unpin + ?Sized,
A: Allocator + 'static, type Output = <F as Future>::Output;impl<I, A> Iterator for Box<I, A> where
I: Iterator + ?Sized,
A: Allocator, type Item = <I as Iterator>::Item;
impl<R> Read for Box<R, Global> where
R: Read + ?Sized, impl<W> Write for Box<W, Global> where
W: Write + ?Sized, impl<F, A> Future for Box<F, A> where
F: Future + Unpin + ?Sized,
A: Allocator + 'static, type Output = <F as Future>::Output;impl<I, A> Iterator for Box<I, A> where
I: Iterator + ?Sized,
A: Allocator, type Item = <I as Iterator>::Item;pub fn clone(
&self
) -> Box<dyn SpawnEssentialNamed + Send + Sync + 'clone, Global>ⓘimpl<R> Read for Box<R, Global> where
R: Read + ?Sized, impl<W> Write for Box<W, Global> where
W: Write + ?Sized, impl<F, A> Future for Box<F, A> where
F: Future + Unpin + ?Sized,
A: Allocator + 'static, type Output = <F as Future>::Output;impl<I, A> Iterator for Box<I, A> where
I: Iterator + ?Sized,
A: Allocator, type Item = <I as Iterator>::Item;
impl<R> Read for Box<R, Global> where
R: Read + ?Sized, impl<W> Write for Box<W, Global> where
W: Write + ?Sized, impl<F, A> Future for Box<F, A> where
F: Future + Unpin + ?Sized,
A: Allocator + 'static, type Output = <F as Future>::Output;impl<I, A> Iterator for Box<I, A> where
I: Iterator + ?Sized,
A: Allocator, type Item = <I as Iterator>::Item;pub fn clone(&self) -> Box<dyn SpawnNamed + Send + 'clone, Global>ⓘimpl<R> Read for Box<R, Global> where
R: Read + ?Sized, impl<W> Write for Box<W, Global> where
W: Write + ?Sized, impl<F, A> Future for Box<F, A> where
F: Future + Unpin + ?Sized,
A: Allocator + 'static, type Output = <F as Future>::Output;impl<I, A> Iterator for Box<I, A> where
I: Iterator + ?Sized,
A: Allocator, type Item = <I as Iterator>::Item;
impl<R> Read for Box<R, Global> where
R: Read + ?Sized, impl<W> Write for Box<W, Global> where
W: Write + ?Sized, impl<F, A> Future for Box<F, A> where
F: Future + Unpin + ?Sized,
A: Allocator + 'static, type Output = <F as Future>::Output;impl<I, A> Iterator for Box<I, A> where
I: Iterator + ?Sized,
A: Allocator, type Item = <I as Iterator>::Item;InstancePre’s clone does not require T: Clone
impl<'data, Elf> Clone for VerneedIterator<'data, Elf> where
Elf: Clone + FileHeader,
<Elf as FileHeader>::Endian: Clone,
impl<'data, Elf> Clone for VerneedIterator<'data, Elf> where
Elf: Clone + FileHeader,
<Elf as FileHeader>::Endian: Clone,
impl<'data, Elf> Clone for VerdefIterator<'data, Elf> where
Elf: Clone + FileHeader,
<Elf as FileHeader>::Endian: Clone,
impl<'data, Elf> Clone for VerdefIterator<'data, Elf> where
Elf: Clone + FileHeader,
<Elf as FileHeader>::Endian: Clone,
impl<'data, 'file, Elf, R> Clone for ElfSymbolTable<'data, 'file, Elf, R> where
'data: 'file,
Elf: Clone + FileHeader,
R: Clone + ReadRef<'data>,
<Elf as FileHeader>::Endian: Clone,
impl<'data, 'file, Elf, R> Clone for ElfSymbolTable<'data, 'file, Elf, R> where
'data: 'file,
Elf: Clone + FileHeader,
R: Clone + ReadRef<'data>,
<Elf as FileHeader>::Endian: Clone,
impl<'data, Elf, R> Clone for SymbolTable<'data, Elf, R> where
Elf: Clone + FileHeader,
R: Clone + ReadRef<'data>,
<Elf as FileHeader>::Sym: Clone,
impl<'data, Elf, R> Clone for SymbolTable<'data, Elf, R> where
Elf: Clone + FileHeader,
R: Clone + ReadRef<'data>,
<Elf as FileHeader>::Sym: Clone,
impl<'data, Elf> Clone for VerdauxIterator<'data, Elf> where
Elf: Clone + FileHeader,
<Elf as FileHeader>::Endian: Clone,
impl<'data, Elf> Clone for VerdauxIterator<'data, Elf> where
Elf: Clone + FileHeader,
<Elf as FileHeader>::Endian: Clone,
impl<'data, 'file, Mach, R> Clone for MachOSymbol<'data, 'file, Mach, R> where
Mach: Clone + MachHeader,
R: Clone + ReadRef<'data>,
<Mach as MachHeader>::Nlist: Clone,
impl<'data, 'file, Mach, R> Clone for MachOSymbol<'data, 'file, Mach, R> where
Mach: Clone + MachHeader,
R: Clone + ReadRef<'data>,
<Mach as MachHeader>::Nlist: Clone,
impl<'data, 'file, R> Clone for CoffSymbolTable<'data, 'file, R> where
R: Clone + ReadRef<'data>,
impl<'data, 'file, R> Clone for CoffSymbolTable<'data, 'file, R> where
R: Clone + ReadRef<'data>,
impl<'data, 'file, Mach, R> Clone for MachOSymbolTable<'data, 'file, Mach, R> where
Mach: Clone + MachHeader,
R: Clone + ReadRef<'data>,
impl<'data, 'file, Mach, R> Clone for MachOSymbolTable<'data, 'file, Mach, R> where
Mach: Clone + MachHeader,
R: Clone + ReadRef<'data>,
impl<'data, Elf> Clone for VersionTable<'data, Elf> where
Elf: Clone + FileHeader,
<Elf as FileHeader>::Endian: Clone,
impl<'data, Elf> Clone for VersionTable<'data, Elf> where
Elf: Clone + FileHeader,
<Elf as FileHeader>::Endian: Clone,
impl<'data, Elf> Clone for VernauxIterator<'data, Elf> where
Elf: Clone + FileHeader,
<Elf as FileHeader>::Endian: Clone,
impl<'data, Elf> Clone for VernauxIterator<'data, Elf> where
Elf: Clone + FileHeader,
<Elf as FileHeader>::Endian: Clone,
impl<'data, Mach, R> Clone for SymbolTable<'data, Mach, R> where
Mach: Clone + MachHeader,
R: Clone + ReadRef<'data>,
<Mach as MachHeader>::Nlist: Clone,
impl<'data, Mach, R> Clone for SymbolTable<'data, Mach, R> where
Mach: Clone + MachHeader,
R: Clone + ReadRef<'data>,
<Mach as MachHeader>::Nlist: Clone,
impl<'data, Elf, R> Clone for SectionTable<'data, Elf, R> where
Elf: Clone + FileHeader,
R: Clone + ReadRef<'data>,
<Elf as FileHeader>::SectionHeader: Clone,
impl<'data, Elf, R> Clone for SectionTable<'data, Elf, R> where
Elf: Clone + FileHeader,
R: Clone + ReadRef<'data>,
<Elf as FileHeader>::SectionHeader: Clone,
impl<'data, 'file, Elf, R> Clone for ElfSymbol<'data, 'file, Elf, R> where
'data: 'file,
Elf: Clone + FileHeader,
R: Clone + ReadRef<'data>,
<Elf as FileHeader>::Endian: Clone,
<Elf as FileHeader>::Sym: Clone,
impl<'data, 'file, Elf, R> Clone for ElfSymbol<'data, 'file, Elf, R> where
'data: 'file,
Elf: Clone + FileHeader,
R: Clone + ReadRef<'data>,
<Elf as FileHeader>::Endian: Clone,
<Elf as FileHeader>::Sym: Clone,
impl<R, Program, Offset> Clone for LineRows<R, Program, Offset> where
R: Clone + Reader<Offset = Offset>,
Program: Clone + LineProgram<R, Offset>,
Offset: Clone + ReaderOffset,
impl<R, Program, Offset> Clone for LineRows<R, Program, Offset> where
R: Clone + Reader<Offset = Offset>,
Program: Clone + LineProgram<R, Offset>,
Offset: Clone + ReaderOffset,
impl<R, Offset> Clone for UnitHeader<R, Offset> where
R: Clone + Reader<Offset = Offset>,
Offset: Clone + ReaderOffset,
impl<R, Offset> Clone for UnitHeader<R, Offset> where
R: Clone + Reader<Offset = Offset>,
Offset: Clone + ReaderOffset,
impl<'bases, Section, R> Clone for PartialFrameDescriptionEntry<'bases, Section, R> where
Section: Clone + UnwindSection<R>,
R: Clone + Reader,
<R as Reader>::Offset: Clone,
<Section as UnwindSection<R>>::Offset: Clone,
impl<'bases, Section, R> Clone for PartialFrameDescriptionEntry<'bases, Section, R> where
Section: Clone + UnwindSection<R>,
R: Clone + Reader,
<R as Reader>::Offset: Clone,
<Section as UnwindSection<R>>::Offset: Clone,
impl<R, Offset> Clone for ArangeHeader<R, Offset> where
R: Clone + Reader<Offset = Offset>,
Offset: Clone + ReaderOffset,
impl<R, Offset> Clone for ArangeHeader<R, Offset> where
R: Clone + Reader<Offset = Offset>,
Offset: Clone + ReaderOffset,
impl<R, Offset> Clone for IncompleteLineProgram<R, Offset> where
R: Clone + Reader<Offset = Offset>,
Offset: Clone + ReaderOffset,
impl<R, Offset> Clone for IncompleteLineProgram<R, Offset> where
R: Clone + Reader<Offset = Offset>,
Offset: Clone + ReaderOffset,
impl<R, A> Clone for UnwindContext<R, A> where
R: Clone + Reader,
A: Clone + UnwindContextStorage<R>,
<A as UnwindContextStorage<R>>::Stack: Clone,
impl<R, A> Clone for UnwindContext<R, A> where
R: Clone + Reader,
A: Clone + UnwindContextStorage<R>,
<A as UnwindContextStorage<R>>::Stack: Clone,
impl<R, Offset> Clone for AttributeValue<R, Offset> where
R: Clone + Reader<Offset = Offset>,
Offset: Clone + ReaderOffset,
impl<R, Offset> Clone for AttributeValue<R, Offset> where
R: Clone + Reader<Offset = Offset>,
Offset: Clone + ReaderOffset,
impl<R, Offset> Clone for CommonInformationEntry<R, Offset> where
R: Clone + Reader<Offset = Offset>,
Offset: Clone + ReaderOffset,
impl<R, Offset> Clone for CommonInformationEntry<R, Offset> where
R: Clone + Reader<Offset = Offset>,
Offset: Clone + ReaderOffset,
impl<R, Offset> Clone for FrameDescriptionEntry<R, Offset> where
R: Clone + Reader<Offset = Offset>,
Offset: Clone + ReaderOffset,
impl<R, Offset> Clone for FrameDescriptionEntry<R, Offset> where
R: Clone + Reader<Offset = Offset>,
Offset: Clone + ReaderOffset,
impl<R, Offset> Clone for LineInstruction<R, Offset> where
R: Clone + Reader<Offset = Offset>,
Offset: Clone + ReaderOffset,
impl<R, Offset> Clone for LineInstruction<R, Offset> where
R: Clone + Reader<Offset = Offset>,
Offset: Clone + ReaderOffset,
impl<'bases, Section, R> Clone for CfiEntriesIter<'bases, Section, R> where
Section: Clone + UnwindSection<R>,
R: Clone + Reader,
impl<'bases, Section, R> Clone for CfiEntriesIter<'bases, Section, R> where
Section: Clone + UnwindSection<R>,
R: Clone + Reader,
impl<'abbrev, 'unit, R, Offset> Clone for DebuggingInformationEntry<'abbrev, 'unit, R, Offset> where
R: Clone + Reader<Offset = Offset>,
Offset: Clone + ReaderOffset,
impl<'abbrev, 'unit, R, Offset> Clone for DebuggingInformationEntry<'abbrev, 'unit, R, Offset> where
R: Clone + Reader<Offset = Offset>,
Offset: Clone + ReaderOffset,
impl<R, Offset> Clone for LineProgramHeader<R, Offset> where
R: Clone + Reader<Offset = Offset>,
Offset: Clone + ReaderOffset,
impl<R, Offset> Clone for LineProgramHeader<R, Offset> where
R: Clone + Reader<Offset = Offset>,
Offset: Clone + ReaderOffset,
impl<R, Offset> Clone for CompleteLineProgram<R, Offset> where
R: Clone + Reader<Offset = Offset>,
Offset: Clone + ReaderOffset,
impl<R, Offset> Clone for CompleteLineProgram<R, Offset> where
R: Clone + Reader<Offset = Offset>,
Offset: Clone + ReaderOffset,
impl<I> Clone for Peekable<I> where
I: Clone + FallibleIterator,
<I as FallibleIterator>::Item: Clone,
impl<I> Clone for Peekable<I> where
I: Clone + FallibleIterator,
<I as FallibleIterator>::Item: Clone,
impl<I> Clone for Flatten<I> where
I: FallibleIterator + Clone,
<I as FallibleIterator>::Item: IntoFallibleIterator,
<<I as FallibleIterator>::Item as IntoFallibleIterator>::IntoFallibleIter: Clone,
impl<I> Clone for Flatten<I> where
I: FallibleIterator + Clone,
<I as FallibleIterator>::Item: IntoFallibleIterator,
<<I as FallibleIterator>::Item as IntoFallibleIterator>::IntoFallibleIter: Clone,
impl<I, U, F> Clone for FlatMap<I, U, F> where
I: Clone,
U: Clone + IntoFallibleIterator,
F: Clone,
<U as IntoFallibleIterator>::IntoFallibleIter: Clone,
impl<I, U, F> Clone for FlatMap<I, U, F> where
I: Clone,
U: Clone + IntoFallibleIterator,
F: Clone,
<U as IntoFallibleIterator>::IntoFallibleIter: Clone,
pub fn clone(&self) -> Box<dyn DynDigest + 'static, Global>ⓘimpl<R> Read for Box<R, Global> where
R: Read + ?Sized, impl<W> Write for Box<W, Global> where
W: Write + ?Sized, impl<F, A> Future for Box<F, A> where
F: Future + Unpin + ?Sized,
A: Allocator + 'static, type Output = <F as Future>::Output;impl<I, A> Iterator for Box<I, A> where
I: Iterator + ?Sized,
A: Allocator, type Item = <I as Iterator>::Item;
impl<R> Read for Box<R, Global> where
R: Read + ?Sized, impl<W> Write for Box<W, Global> where
W: Write + ?Sized, impl<F, A> Future for Box<F, A> where
F: Future + Unpin + ?Sized,
A: Allocator + 'static, type Output = <F as Future>::Output;impl<I, A> Iterator for Box<I, A> where
I: Iterator + ?Sized,
A: Allocator, type Item = <I as Iterator>::Item;impl<A, B> Clone for Chain<A, B> where
A: Clone + ParallelIterator,
B: Clone + ParallelIterator<Item = <A as ParallelIterator>::Item>,
impl<A, B> Clone for Chain<A, B> where
A: Clone + ParallelIterator,
B: Clone + ParallelIterator<Item = <A as ParallelIterator>::Item>,
impl<I, J> Clone for InterleaveShortest<I, J> where
I: Clone + IndexedParallelIterator,
J: Clone + IndexedParallelIterator<Item = <I as ParallelIterator>::Item>,
impl<I, J> Clone for InterleaveShortest<I, J> where
I: Clone + IndexedParallelIterator,
J: Clone + IndexedParallelIterator<Item = <I as ParallelIterator>::Item>,
impl<I, J> Clone for Interleave<I, J> where
I: Clone + IndexedParallelIterator,
J: Clone + IndexedParallelIterator<Item = <I as ParallelIterator>::Item>,
impl<I, J> Clone for Interleave<I, J> where
I: Clone + IndexedParallelIterator,
J: Clone + IndexedParallelIterator<Item = <I as ParallelIterator>::Item>,
impl<I> Clone for Intersperse<I> where
I: Clone + ParallelIterator,
<I as ParallelIterator>::Item: Clone,
<I as ParallelIterator>::Item: Clone,
impl<I> Clone for Intersperse<I> where
I: Clone + ParallelIterator,
<I as ParallelIterator>::Item: Clone,
<I as ParallelIterator>::Item: Clone,
impl<A, B> Clone for ZipEq<A, B> where
A: Clone + IndexedParallelIterator,
B: Clone + IndexedParallelIterator,
impl<A, B> Clone for ZipEq<A, B> where
A: Clone + IndexedParallelIterator,
B: Clone + IndexedParallelIterator,
impl<A, B> Clone for Zip<A, B> where
A: Clone + IndexedParallelIterator,
B: Clone + IndexedParallelIterator,
impl<A, B> Clone for Zip<A, B> where
A: Clone + IndexedParallelIterator,
B: Clone + IndexedParallelIterator,
impl<I, T, E> Clone for FlattenOk<I, T, E> where
I: Iterator<Item = Result<T, E>> + Clone,
T: IntoIterator,
<T as IntoIterator>::IntoIter: Clone,
impl<I, T, E> Clone for FlattenOk<I, T, E> where
I: Iterator<Item = Result<T, E>> + Clone,
T: IntoIterator,
<T as IntoIterator>::IntoIter: Clone,
impl<T> Clone for TupleBuffer<T> where
T: Clone + HomogeneousTuple,
<T as TupleCollect>::Buffer: Clone,
impl<T> Clone for TupleBuffer<T> where
T: Clone + HomogeneousTuple,
<T as TupleCollect>::Buffer: Clone,
impl<I, T> Clone for TupleWindows<I, T> where
I: Clone + Iterator<Item = <T as TupleCollect>::Item>,
T: Clone + HomogeneousTuple,
impl<I, T> Clone for TupleWindows<I, T> where
I: Clone + Iterator<Item = <T as TupleCollect>::Item>,
T: Clone + HomogeneousTuple,
impl<I, T> Clone for CountedListWriter<I, T> where
I: Serialize<Error = Error> + Clone,
T: Clone + IntoIterator<Item = I>,
impl<I, T> Clone for CountedListWriter<I, T> where
I: Serialize<Error = Error> + Clone,
T: Clone + IntoIterator<Item = I>,
impl<X> Clone for Uniform<X> where
X: Clone + SampleUniform,
<X as SampleUniform>::Sampler: Clone,
impl<X> Clone for Uniform<X> where
X: Clone + SampleUniform,
<X as SampleUniform>::Sampler: Clone,
impl<X> Clone for WeightedIndex<X> where
X: Clone + SampleUniform + PartialOrd<X>,
<X as SampleUniform>::Sampler: Clone,
impl<X> Clone for WeightedIndex<X> where
X: Clone + SampleUniform + PartialOrd<X>,
<X as SampleUniform>::Sampler: Clone,
impl<R, Rsdr> Clone for ReseedingRng<R, Rsdr> where
R: BlockRngCore + SeedableRng + Clone,
Rsdr: RngCore + Clone,
impl<R, Rsdr> Clone for ReseedingRng<R, Rsdr> where
R: BlockRngCore + SeedableRng + Clone,
Rsdr: RngCore + Clone,
impl<R> Clone for BlockRng64<R> where
R: Clone + BlockRngCore + ?Sized,
<R as BlockRngCore>::Results: Clone,
impl<R> Clone for BlockRng64<R> where
R: Clone + BlockRngCore + ?Sized,
<R as BlockRngCore>::Results: Clone,
impl<R> Clone for BlockRng<R> where
R: Clone + BlockRngCore + ?Sized,
<R as BlockRngCore>::Results: Clone,
impl<R> Clone for BlockRng<R> where
R: Clone + BlockRngCore + ?Sized,
<R as BlockRngCore>::Results: Clone,
impl<T, OutSize> Clone for CtVariableCoreWrapper<T, OutSize> where
T: Clone + VariableOutputCore,
OutSize: Clone + ArrayLength<u8> + IsLessOrEqual<<T as OutputSizeUser>::OutputSize>,
<OutSize as IsLessOrEqual<<T as OutputSizeUser>::OutputSize>>::Output: NonZero,
<T as BlockSizeUser>::BlockSize: IsLess<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>>,
<<T as BlockSizeUser>::BlockSize as IsLess<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>>>::Output: NonZero,
impl<T, OutSize> Clone for CtVariableCoreWrapper<T, OutSize> where
T: Clone + VariableOutputCore,
OutSize: Clone + ArrayLength<u8> + IsLessOrEqual<<T as OutputSizeUser>::OutputSize>,
<OutSize as IsLessOrEqual<<T as OutputSizeUser>::OutputSize>>::Output: NonZero,
<T as BlockSizeUser>::BlockSize: IsLess<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>>,
<<T as BlockSizeUser>::BlockSize as IsLess<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>>>::Output: NonZero,
impl<T> Clone for CoreWrapper<T> where
T: Clone + BufferKindUser,
<T as BlockSizeUser>::BlockSize: IsLess<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>>,
<<T as BlockSizeUser>::BlockSize as IsLess<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>>>::Output: NonZero,
<T as BlockSizeUser>::BlockSize: Clone,
<T as BufferKindUser>::BufferKind: Clone,
impl<T> Clone for CoreWrapper<T> where
T: Clone + BufferKindUser,
<T as BlockSizeUser>::BlockSize: IsLess<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>>,
<<T as BlockSizeUser>::BlockSize as IsLess<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>>>::Output: NonZero,
<T as BlockSizeUser>::BlockSize: Clone,
<T as BufferKindUser>::BufferKind: Clone,
impl<T> Clone for RtVariableCoreWrapper<T> where
T: Clone + VariableOutputCore + UpdateCore,
<T as BlockSizeUser>::BlockSize: IsLess<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>>,
<<T as BlockSizeUser>::BlockSize as IsLess<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>>>::Output: NonZero,
<T as BlockSizeUser>::BlockSize: Clone,
<T as BufferKindUser>::BufferKind: Clone,
impl<T> Clone for RtVariableCoreWrapper<T> where
T: Clone + VariableOutputCore + UpdateCore,
<T as BlockSizeUser>::BlockSize: IsLess<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>>,
<<T as BlockSizeUser>::BlockSize as IsLess<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>>>::Output: NonZero,
<T as BlockSizeUser>::BlockSize: Clone,
<T as BufferKindUser>::BufferKind: Clone,
pub fn clone(&self) -> Box<dyn DynDigest + 'static, Global>ⓘimpl<R> Read for Box<R, Global> where
R: Read + ?Sized, impl<W> Write for Box<W, Global> where
W: Write + ?Sized, impl<F, A> Future for Box<F, A> where
F: Future + Unpin + ?Sized,
A: Allocator + 'static, type Output = <F as Future>::Output;impl<I, A> Iterator for Box<I, A> where
I: Iterator + ?Sized,
A: Allocator, type Item = <I as Iterator>::Item;
impl<R> Read for Box<R, Global> where
R: Read + ?Sized, impl<W> Write for Box<W, Global> where
W: Write + ?Sized, impl<F, A> Future for Box<F, A> where
F: Future + Unpin + ?Sized,
A: Allocator + 'static, type Output = <F as Future>::Output;impl<I, A> Iterator for Box<I, A> where
I: Iterator + ?Sized,
A: Allocator, type Item = <I as Iterator>::Item;impl<T> Clone for XofReaderCoreWrapper<T> where
T: Clone + XofReaderCore,
<T as BlockSizeUser>::BlockSize: IsLess<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>>,
<<T as BlockSizeUser>::BlockSize as IsLess<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>>>::Output: NonZero,
<T as BlockSizeUser>::BlockSize: Clone,
impl<T> Clone for XofReaderCoreWrapper<T> where
T: Clone + XofReaderCore,
<T as BlockSizeUser>::BlockSize: IsLess<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>>,
<<T as BlockSizeUser>::BlockSize as IsLess<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>>>::Output: NonZero,
<T as BlockSizeUser>::BlockSize: Clone,
impl<BlockSize, Kind> Clone for BlockBuffer<BlockSize, Kind> where
BlockSize: ArrayLength<u8> + IsLess<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>>,
Kind: BufferKind,
<BlockSize as IsLess<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>>>::Output: NonZero,
impl<BlockSize, Kind> Clone for BlockBuffer<BlockSize, Kind> where
BlockSize: ArrayLength<u8> + IsLess<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>>,
Kind: BufferKind,
<BlockSize as IsLess<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>>>::Output: NonZero,
impl<R, Rsdr> Clone for ReseedingRng<R, Rsdr> where
R: BlockRngCore + SeedableRng + Clone,
Rsdr: RngCore + Clone,
impl<R, Rsdr> Clone for ReseedingRng<R, Rsdr> where
R: BlockRngCore + SeedableRng + Clone,
Rsdr: RngCore + Clone,
impl<X> Clone for WeightedIndex<X> where
X: Clone + SampleUniform + PartialOrd<X>,
<X as SampleUniform>::Sampler: Clone,
impl<X> Clone for WeightedIndex<X> where
X: Clone + SampleUniform + PartialOrd<X>,
<X as SampleUniform>::Sampler: Clone,
impl<X> Clone for Uniform<X> where
X: Clone + SampleUniform,
<X as SampleUniform>::Sampler: Clone,
impl<X> Clone for Uniform<X> where
X: Clone + SampleUniform,
<X as SampleUniform>::Sampler: Clone,
impl<R> Clone for BlockRng<R> where
R: Clone + BlockRngCore + ?Sized,
<R as BlockRngCore>::Results: Clone,
impl<R> Clone for BlockRng<R> where
R: Clone + BlockRngCore + ?Sized,
<R as BlockRngCore>::Results: Clone,
impl<R> Clone for BlockRng64<R> where
R: Clone + BlockRngCore + ?Sized,
<R as BlockRngCore>::Results: Clone,
impl<R> Clone for BlockRng64<R> where
R: Clone + BlockRngCore + ?Sized,
<R as BlockRngCore>::Results: Clone,
impl<D> Clone for Hmac<D> where
D: Update + BlockInput + FixedOutput + Reset + Default + Clone,
<D as BlockInput>::BlockSize: ArrayLength<u8>,
impl<D> Clone for Hmac<D> where
D: Update + BlockInput + FixedOutput + Reset + Default + Clone,
<D as BlockInput>::BlockSize: ArrayLength<u8>,
impl<X> Clone for WeightedIndex<X> where
X: Clone + SampleUniform + PartialOrd<X>,
<X as SampleUniform>::Sampler: Clone,
impl<X> Clone for WeightedIndex<X> where
X: Clone + SampleUniform + PartialOrd<X>,
<X as SampleUniform>::Sampler: Clone,
impl<X> Clone for Uniform<X> where
X: Clone + SampleUniform,
<X as SampleUniform>::Sampler: Clone,
impl<X> Clone for Uniform<X> where
X: Clone + SampleUniform,
<X as SampleUniform>::Sampler: Clone,
impl<R, Rsdr> Clone for ReseedingRng<R, Rsdr> where
R: BlockRngCore + SeedableRng + Clone,
Rsdr: RngCore + Clone,
impl<R, Rsdr> Clone for ReseedingRng<R, Rsdr> where
R: BlockRngCore + SeedableRng + Clone,
Rsdr: RngCore + Clone,
impl<R, Rsdr> Clone for ReseedingRng<R, Rsdr> where
R: Clone + BlockRngCore + SeedableRng,
Rsdr: Clone + RngCore,
impl<R, Rsdr> Clone for ReseedingRng<R, Rsdr> where
R: Clone + BlockRngCore + SeedableRng,
Rsdr: Clone + RngCore,
impl<R> Clone for BlockRng64<R> where
R: Clone + BlockRngCore + ?Sized,
<R as BlockRngCore>::Results: Clone,
impl<R> Clone for BlockRng64<R> where
R: Clone + BlockRngCore + ?Sized,
<R as BlockRngCore>::Results: Clone,
impl<R> Clone for BlockRng<R> where
R: Clone + BlockRngCore + ?Sized,
<R as BlockRngCore>::Results: Clone,
impl<R> Clone for BlockRng<R> where
R: Clone + BlockRngCore + ?Sized,
<R as BlockRngCore>::Results: Clone,
impl<D> Clone for Hmac<D> where
D: Update + BlockInput + FixedOutput + Reset + Default + Clone,
<D as BlockInput>::BlockSize: ArrayLength<u8>,
impl<D> Clone for Hmac<D> where
D: Update + BlockInput + FixedOutput + Reset + Default + Clone,
<D as BlockInput>::BlockSize: ArrayLength<u8>,
pub fn clone(&self) -> Box<dyn DynDigest + 'static, Global>ⓘimpl<R> Read for Box<R, Global> where
R: Read + ?Sized, impl<W> Write for Box<W, Global> where
W: Write + ?Sized, impl<F, A> Future for Box<F, A> where
F: Future + Unpin + ?Sized,
A: Allocator + 'static, type Output = <F as Future>::Output;impl<I, A> Iterator for Box<I, A> where
I: Iterator + ?Sized,
A: Allocator, type Item = <I as Iterator>::Item;
impl<R> Read for Box<R, Global> where
R: Read + ?Sized, impl<W> Write for Box<W, Global> where
W: Write + ?Sized, impl<F, A> Future for Box<F, A> where
F: Future + Unpin + ?Sized,
A: Allocator + 'static, type Output = <F as Future>::Output;impl<I, A> Iterator for Box<I, A> where
I: Iterator + ?Sized,
A: Allocator, type Item = <I as Iterator>::Item;